public class TestMain {
    public static void main(String[] args) {
        MyHeap myHeap = new MyHeap();
        int[] array = {27,15,19,18,28,34,65,49,25,37};
        System.out.println("调整前：");
        for(int i = 0; i < array.length ; i++) {
            System.out.print(array[i] + " ");
        }
        for(int parent = (array.length-2)/2 ; parent >= 0; parent --) {
            myHeap.shiftDown(array, parent);
        }
        System.out.println();
        System.out.println("调整后：");
        for(int i = 0; i < array.length ; i++) {
            System.out.print(array[i] + " ");
        }
        System.out.println();
    }
}
